Skip to content

Formatter: print FunctionLiteralExpression correctly#128

Merged
Hackerpilot merged 1 commit intodlang-community:masterfrom
wilzbach:fix-format-function
Feb 23, 2017
Merged

Formatter: print FunctionLiteralExpression correctly#128
Hackerpilot merged 1 commit intodlang-community:masterfrom
wilzbach:fix-format-function

Conversation

@wilzbach
Copy link
Member

@wilzbach wilzbach commented Feb 22, 2017

The identifier of the FunctionLiteralExpression doesn't get correctly printed with the formatter (and FWIW also not with dscanner --ast).

Previously:

In: map!(i => i)
Out: map!(  => i)

See also: https://github.com/Hackerpilot/libdparse/blob/master/src/dparse/parser.d#L3010

I couldn't find a place for tests of the formatter. A good test would be to parse, and dump a lot of D code with high coverage (e.g. parts of Phobos or Mir) - if afterwards all tests still pass, the formatter didn't totally screw up...

Previously:

In: map!(i => i)
Out: map!(  => i)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments